package design.graduation.novelsystem.model.domian;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @author: 洪少尉
 * @Date: 2020/4/18 13:49
 * @Description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "website_include_book")
public class IncludeBook implements Serializable {
	/**
	 * 主键
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Integer id;

	/**
	 * 书名
	 */
	@TableField(value = "book_name")
	private String bookName;

	/**
	 * 作者
	 */
	@TableField(value = "author")
	private String author;

	/**
	 * 一级分类
	 */
	@TableField(value = "primary_classification")
	private Integer primaryClassification;

	/**
	 * 二级分类
	 */
	@TableField(value = "secondary_classification")
	private Integer secondaryClassification;

	/**
	 * 三级分类
	 */
	@TableField(value = "tertiary_classification")
	private String tertiaryClassification;

	/**
	 * 内容简介
	 */
	@TableField(value = "introduction")
	private String introduction;

	/**
	 * 总点击数
	 */
	@TableField(value = "total_clicks")
	private Integer totalClicks;

	/**
	 * 月点击数
	 */
	@TableField(value = "month_clicks")
	private Integer monthClicks;

	/**
	 * 保存时间
	 */
	@TableField(value = "create_time")
	private Date createTime;

	/**
	 * 修改时间
	 */
	@TableField(value = "edit_time")
	private Date editTime;

	/**
	 * 上架状态：0，下架；1，上架
	 */
	@TableField(value = "status")
	private Integer status;

	/**
	 * 保存地址
	 */
	@TableField(value = "save_addr")
	private String saveAddr;

	public IncludeBook(String bookName, String author, Integer primaryClassification, Integer secondaryClassification, String tertiaryClassification, String introduction, Date createTime, Date editTime, Integer status, String saveAddr) {
		this.bookName = bookName;
		this.author = author;
		this.primaryClassification = primaryClassification;
		this.secondaryClassification = secondaryClassification;
		this.tertiaryClassification = tertiaryClassification;
		this.introduction = introduction;
		this.createTime = createTime;
		this.editTime = editTime;
		this.status = status;
		this.saveAddr = saveAddr;
	}

	public IncludeBook(Integer id, Date editTime, Integer status) {
		this.id = id;
		this.editTime = editTime;
		this.status = status;
	}

	private static final long serialVersionUID = 1L;

	public static final String COL_ID = "id";

	public static final String COL_BOOK_NAME = "book_name";

	public static final String COL_AUTHOR = "author";

	public static final String COL_PRIMARY_CLASSIFICATION = "primary_classification";

	public static final String COL_SECONDARY_CLASSIFICATION = "secondary_classification";

	public static final String COL_TERTIARY_CLASSIFICATION = "tertiary_classification";

	public static final String COL_INTRODUCTION = "introduction";

	public static final String COL_TOTAL_CLICKS = "total_clicks";

	public static final String COL_MONTH_CLICKS = "month_clicks";

	public static final String COL_CREATE_TIME = "create_time";

	public static final String COL_EDIT_TIME = "edit_time";

	public static final String COL_STATUS = "status";

	public static final String COL_SAVE_ADDR = "save_addr";
}